import manifest from './../manifest.json'
const envConfig = {
  dev: {
    // apiHost: 'https://devapi.qichengcx.com',
    // imgUrl: 'http://devapi.qichengcx.com/image/www/images/scooter',
    // apiHost: 'http://192.168.1.86:8000',
    // imgUrl: 'http://192.168.1.86:8000/image/www/images/scooter',
    apiHost: 'http://110jp4684fi92.vicp.fun',
    imgUrl: 'https://110jp4684fi92.vicp.fun/image/www/images/scooter',
  },
  test: {
    // apiHost: 'https://testapi.qichengcx.com',
    // imgUrl: 'https://testimage.qichengcx.com/www/images/scooter',
    apiHost: 'http://110jp4684fi92.vicp.fun',
    imgUrl: 'https://110jp4684fi92.vicp.fun/image/www/images/scooter',
  },
  test02: {
    // apiHost: 'https://testapi02.qichengcx.com',
    // imgUrl: 'https://testimage.qichengcx.com/www/images/scooter',
    apiHost: 'http://110jp4684fi92.vicp.fun',
    imgUrl: 'https://110jp4684fi92.vicp.fun/image/www/images/scooter',
  },
  pre: {
    // apiHost: 'https://preapi.qichengcx.com',
    // imgUrl: 'https://image.qichengcx.com/www/images/scooter',
    apiHost: 'http://110jp4684fi92.vicp.fun',
    imgUrl: 'https://110jp4684fi92.vicp.fun/image/www/images/scooter',
  },
  prod: {
    // apiHost: 'https://api.qichengcx.com',
    // imgUrl: 'https://image.qichengcx.com/www/images/scooter',
    apiHost: 'http://110jp4684fi92.vicp.fun',
    imgUrl: 'https://110jp4684fi92.vicp.fun/image/www/images/scooter',
  },
}
/* 参数配置 */
const config = {
  /* 环境 */
  env: 'dev', // dev/test/test02/pre/prod
  /* 应用名 */
  name: 'app-svms-employee',
  /* 是否异步路由 */
  asyncRoutes: true,
  /* token Key */
  tokenKey: 'ticket',
  /* 接口Api */
  // #ifdef APP-PLUS
  // apiBaseUrl: '/wvms',
  // #endif
  // #ifdef H5
  apiBaseUrl: process.env.UNI_PLATFORM === 'app-plus' ? '/wvms' : '/api/wvms',
  // #endif
  /* 高德地图KEY */
  GaoDeMapKey: '437d056b2bf4f91d3effd04ea7aad9ba',
  /* 请求白名单 */
  requestWhiteList: ['/vmsLogin/login', '/user/wxlogin'],
  // 发布配置 begin
  version: manifest.versionName,
  api_version: '5.9.3',
  // 发布配置 end
}

// 请求api,填充env
const env = envConfig[config.env]
const appConfig = {
  ...config,
  ...env,
}

export {
  appConfig,
  envConfig
}
